package com.zhichat.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 会话表
 *
 * @author 团长九哥 https://space.bilibili.com/602197686
 * @email insanetz@163.com
 * @date 2024-12-11 22:23:46
 */
@Data
@Accessors(chain = true)
@TableName("chat_session")
public class ChatSessionEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 会话ID
     */
    @TableId("id")
    private String id;
    /**
     * 最后接受到消息的消息体
     */
    @TableField("last_msg")
    private String lastMsg;
    /**
     * 最后接受到消息的毫秒值
     */
    @TableField("last_receive_time")
    private Long lastReceiveTime;
    /**
     * 创建时间
     */
    @JsonIgnore
    @TableField("create_time")
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    @JsonIgnore
    @TableField("update_time")
    private LocalDateTime updateTime;
}
